home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / xshogi11.lha / xshogi-1.1 / Makefile.custom < prev    next >
Makefile  |  1993-04-28  |  4KB  |  115 lines

  1. # Makefile for XShogi
  2. # Copyright (c) 1993 Matthias Mutz
  3. #
  4. # XShogi 1.1 is based on XBoard 2.0
  5. # Copyright (c) 1992 Free Software Foundation
  6. #
  7. # This file is part of XShogi.
  8. #
  9. # XShogi is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; either version 1, or (at your option)
  12. # any later version.
  13. #
  14. # XShogi is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with XShogi; see the file COPYING.  If not, write to
  21. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22. #
  23.  
  24. #
  25. # xshogi    is the XWindow based user interface for GNU Shogi (gnushogix)
  26. #
  27.  
  28. VERS = 1.1
  29.  
  30. # Home directory
  31. #HOME = //capella/u/mutz
  32. HOME= /public/projects/shogi
  33.  
  34. # Distribution directory
  35. DISTDIR = $(HOME)
  36.  
  37. # Compress program
  38. COMPRESS = gzip
  39. Z = z
  40.  
  41. # Programs being distributed
  42. PROGS=xshogi-$(VERS)
  43.  
  44. # Change these to something less transitory, like /usr/games, and then
  45. # compile. Ask your system admin / unix guru to put gnushogi.{hash,lang,book}
  46. # in $(LIBDIR).
  47. # Where the binaries live.
  48. BINDIR= $(HOME)/bin
  49.  
  50. # Machine dependent CC options
  51. # Set proper options in order to find the XWindow libraries
  52. # This is for apollo with inlib files and local X-includes
  53. #ANSI= -I/usr/local/include/ansi
  54. #CCOPTIONS= -g -I/usr/local/include -W0,-inlib,/lib/x11lib.r4,/lib/xawlib.r4,/lib/xtlib.r4,/lib/xmulib.r4 -A inlib,/lib/x11lib.r4,/lib/xawlib.r4,/lib/xtlib.r4,/lib/xmulib.r4,/lib/xextlib.r4
  55. # This is for Sun4
  56. CCOPTIONS= -g -I/public/X11/include
  57. LDOPTIONS= -L/public/X11/lib -lXaw -lXmu -lXt -lXext -lX11
  58. # This is for IRIS
  59. #CCOPTIONS= -cckr -fload -DSYSV -DIRIS
  60. #LDOPTIONS= -lXaw -lXmu -lXt_s -lXext -lX11_s -lsun -lmalloc -lc_s
  61.  
  62. # Options for xshogi
  63. # Use the -DWESTERN_BITMAPS option if you do not want the japenese images.
  64. # Thanks to Paul Raines for making the "westernized" set available.
  65. OPT = -DHAS_GETTIMEOFDAY # -DWESTERN_BITMAPS
  66.  
  67. FIRST_PROGRAM  = -DFIRST_CHESS_PROGRAM=\"$(BINDIR)/gnushogix\"
  68. SECOND_PROGRAM = -DSECOND_CHESS_PROGRAM=\"$(BINDIR)/gnushogix\"
  69. FIRST_HOST     = -DFIRST_HOST=\"localhost\"
  70. SECOND_HOST    = -DSECOND_HOST=\"localhost\"
  71.  
  72. all: xshogi
  73.  
  74. xshogi: xshogi.o parser.o
  75.     cc -o xshogi xshogi.o parser.o $(CCOPTIONS) $(LDOPTIONS) 
  76.  
  77. xshogi.o: xshogi.c parser.o xshogi.h version.h
  78.     cc -c xshogi.c $(CCOPTIONS) $(OPT) $(FIRST_PROGRAM) $(SECOND_PROGRAM) $(FIRST_HOST) $(SECOND_HOST)
  79.  
  80. parser.o: scanner.c parser.c xshogi.h
  81.     cc -c parser.c $(ANSI) $(CCOPTIONS)
  82.  
  83. scanner.c: scanner.flex
  84.     flex scanner.flex
  85.     mv lex.yy.c scanner.c
  86.  
  87. parser.c: parser.bison
  88.     bison parser.bison
  89.     mv parser.bison.tab.c parser.c
  90.  
  91. distribution:
  92.     -patchlevel=`cat $(DISTDIR)/xshogi-$(VERS)/version.h|grep patchlevel|sed -e 's/[^0-9]//g'` ;\
  93.     echo " XShogi patchlevel is $$patchlevel" ;\
  94.     cd $(DISTDIR) ;\
  95.     rm -f xshogi.tar.$(VERS).$(Z)* ;\
  96.     tar cf - $(PROGS) | $(COMPRESS) > $(DISTDIR)/xshogi-$(VERS).pl$$patchlevel.tar.$(Z) ;\
  97. #    rm -f xshogi.tar.$(VERS).$(Z).uu* ;\
  98. #    uuencode xshogi-$(VERS).pl$$patchlevel.tar.$(Z) xshogi-$(VERS).pl$$patchlevel.tar.$(Z) > xshogi-$(VERS).pl$$patchlevel.tar.$(Z).uu ;\
  99. #    rm -f x?? ;\
  100. #    split -2500 xshogi-$(VERS).pl$$patchlevel.tar.$(Z).uu ;\
  101. #    for i in x??; do \
  102. #      mv $$i $(DISTDIR)/XShogi_$$i; \
  103. #    done
  104.  
  105. install: xshogi
  106.     -cp xshogi $(BINDIR)/xshogi
  107.  
  108. clean:
  109.     -rm -f xshogi
  110.     -echo $(DISTDIR)/xshogi-$(VERS)
  111.     -find $(DISTDIR)/xshogi-$(VERS) \( -name '*.o' -o -name '*~' -o -name 'CL*' -o -name 'PATCH*' -o -name '#*#' -o -name '%*%' -o -name '*orig' -o -name '*bak' -o -name '*BAK' \) -exec rm -f {} \;
  112.  
  113.  
  114.  
  115.